:root {
--primary: #646cff;
--bg: #f9f9f9;
--card: #ffffff;
--text: #213547;
--danger: #ff4d4f;
}
html,
body {
margin: 0;
padding: 0;
}
body {
color: var(--text);
font-family:
Inter,
system-ui,
-apple-system,
BlinkMacSystemFont,
'Segoe UI',
Roboto,
Oxygen,
Ubuntu,
Cantarell,
'Open Sans',
'Helvetica Neue',
Avenir,
Helvetica,
Arial,
sans-serif;
background-color: var(--bg);
display: flex;
justify-content: center;
min-height: 100vh;
}
.app-container {
width: 100%;
max-width: 500px;
padding: 2rem;
}
h1 {
margin: 0;
font-size: 2.5rem;
background: linear-gradient(to right, #646cff, #ff6b6b);
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
color: transparent;
}
p {
color: #888888;
margin-top: 0.5rem;
}
.input-group {
display: flex;
gap: 10px;
margin-bottom: 1.5rem;
}
input[type='text'] {
flex: 1;
padding: 12px;
border: 1px solid #ddd;
border-radius: 8px;
font-size: 1rem;
outline: none;
transition: border-color 0.2s;
&:focus {
border-color: var(--primary);
}
}
button {
padding: 10px 20px;
border: none;
border-radius: 8px;
background-color: var(--primary);
color: white;
font-weight: 600;
cursor: pointer;
transition:
opacity 0.2s,
background-color 0.48s;
&.not-allow {
cursor: unset;
background-color: #9696aa;
}
&:not(.not-allow):hover {
opacity: 0.9;
}
}
.todo-list-container {
background: var(--card);
border-radius: 12px;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
overflow: hidden;
}
.filters {
padding: 1rem;
border-bottom: 1px solid #eee;
display: flex;
justify-content: space-between;
align-items: center;
font-size: 0.9rem;
background: #fafafa;
.buttons button {
background: transparent;
color: #888888;
padding: 5px 10px;
margin: 0 2px;
&.active {
color: var(--primary);
cursor: unset;
background: rgba(100, 108, 255, 0.1);
}
}
}
.clear-btn {
background: transparent;
color: var(--danger);
font-size: 0.8rem;
padding: 5px;
}
.list {
padding: 1rem;
min-height: 200px;
}
.todo-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 12px;
border-bottom: 1px solid #f0f0f0;
transition: all 0.2s;
&:last-child {
border-bottom: none;
}
&.completed .todo-content span {
text-decoration: line-through;
color: #aaaaaa;
}
&:hover .delete-btn {
opacity: 1;
}
}
.todo-content {
display: flex;
align-items: center;
gap: 12px;
cursor: pointer;
flex: 1;
span {
font-size: 1.1rem;
}
}
.delete-btn {
background: transparent;
color: #ff4d4f;
font-size: 1.5rem;
padding: 0px 10px;
opacity: 0;
transition: opacity 0.2s;
}
.empty-state {
text-align: center;
color: #cccccc;
padding: 2rem;
}